﻿<UserControl x:Class="UI.WatermarkTextBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    DataContext="{Binding RelativeSource={RelativeSource Self}}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Width="460"         
    d:DesignHeight="72" d:DesignWidth="460">
    
    <Grid x:Name="LayoutRoot">
        <TextBox Name="textBox" TextWrapping="{Binding Path=TextWrapping}"  GotFocus="textBox_GotFocus" LostFocus="textBox_LostFocus" TextChanged="textBox_TextChanged" />
        <TextBlock Padding="18,19,0,0" FontSize="{Binding Path=FontSize, ElementName=textBox}" Text="{Binding Path=WatermarkText}" Name="textBlock" Foreground="{Binding Path=WatermarkTextForeground}" IsHitTestVisible="False" />
    </Grid>
</UserControl>
